﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="Luminji.Exam.Application" %>

<%@ Import Namespace="Luminji.Exam.Model.Papers" %>

<%@ Import Namespace="Luminji.ExamWeb.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%Response.Write(ApplicationSession.Title); %>-当前科目：<%Response.Write(ViewBag.SubjectName); %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="middlebar">
     <%
         Response.Write("**"+HttpContext.Current.User.Identity.Name+"==");


         Response.Write(Context.User.Identity.Name); 
    %>
        当前科目：<%Response.Write(ViewBag.SubjectName); %></div>
    <div class="middletitle">
        <ul>
            <%
                foreach (Paper paper in ViewBag.PaperList)
                {
                    Response.Write(string.Format("<li><a href='paper.html?papername={0}&papercode={1}' target='_blank'>{2}</a></li>", paper.PaperName, paper.PaperCode, paper.PaperName));
                }
            %>
        </ul>
    </div>
    <div style="text-align: right;">
        <%
            if (ViewBag.TotalPageNum > 1)
            {
                Response.Write(string.Format("<a href='?subject={0}&code={1}&pagenum={2}'>首页</a>&nbsp;", ViewBag.SubjectName, ViewBag.SubjectCode, 1));
            }
            if (ViewBag.PageNum > 1)
            {
                Response.Write(string.Format("<a href='?subject={0}&code={1}&pagenum={2}'>上页</a>&nbsp;", ViewBag.SubjectName, ViewBag.SubjectCode, ViewBag.PageNum - 1));
            }
            if (ViewBag.PageNum < ViewBag.TotalPageNum)
            {
                Response.Write(string.Format("<a href='?subject={0}&code={1}&pagenum={2}'>下页</a>&nbsp;", ViewBag.SubjectName, ViewBag.SubjectCode, ViewBag.PageNum + 1));
            }
            if (ViewBag.TotalPageNum > 1)
            {
                Response.Write(string.Format("<a href='?subject={0}&code={1}&pagenum={2}'>末页</a>&nbsp;", ViewBag.SubjectName, ViewBag.SubjectCode, ViewBag.TotalPageNum));
            }
        
        %>
    </div>
</asp:Content>
